package day05_Function;
/*
自定义一个myPrint方法，实现打印不同类型：byte、short、int、long、String、boolean、int []类型的数据
三要素：
方法名：myPrint
参数：byte | short | int | long | String | boolean | int []
返回值：无返回值，直接打印即可
 */
public class Demo10_FuncOverLoadExerclse {
    public static void main(String[] args) {
        myPrint((byte) 10);
        myPrint((short)20);
        myPrint(50);
        myPrint(5l);
        myPrint(5.2);
        myPrint((String)"sa");
        myPrint(true);
        int[] b={1,2,3};
        myPrint(b);
    }
    public static void myPrint(byte a) {
        System.out.println("byte"+a);
    }
    public static void myPrint(short a) {
        System.out.println("short"+a);
    }
    public static void myPrint(int a) {
        System.out.println("int"+a);
    }
    public static void myPrint(long a) {
        System.out.println("long"+a);
    }
    public static void myPrint(double a) {
        System.out.println("double"+a);
    }
    public static void myPrint(String  a) {
        System.out.println("String"+a);
    }
    public static void myPrint(boolean a) {
        System.out.println("boolean"+a);
    }
    public static void myPrint(int[] a) {
        for (int i = 0; i <a.length; i++) {
            System.out.print(a[i]);
        }
        System.out.println();
    }
}
